<div ng-controller="modulesAdvertisementEditCtrl">
    <div class="bg-light lter b-b wrapper-md ng-scope">
        <h4 class="m-n font-thin">模块广告管理</h4>
        <button ui-sref="app.modulesAdvertisement({modulesId:modulesId})" class="btn-back btn btn-dark btn-sm btn-rounded">
            返回
        </button>
    </div>
    <div class="wrapper-md">
        <div class="panel panel-default">
            <div class="panel-heading m-n">
                修改广告信息
            </div>
            <div class="panel-body">
                <form name="advertiseForm" class="form-horizontal form-validation" ng-submit="editAdvertise()">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">广告类型</label>
                        <div class="col-sm-5">
                            <select name="type" class="form-control" ng-model="advertise.advertiseTypeId" required>
                                <option value="">请选择广告类型</option>
                                <option value="{{item.id}}" ng-repeat="item in advertiseTypes">{{item.name}}</option>
                            </select>
                        </div>
                        <div class="col-sm-5 form-text" ng-if="advertiseForm.type.$touched">
                            <span class="text text-danger" ng-if="advertiseForm.type.$error.required">广告类型是必选的</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">广告链接</label>
                        <div class="col-sm-5">
                            <input type="text" name="url" class="form-control" placeholder="请输入广告链接(小程序链接)" ng-model="advertise.advertiseUrl" required>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">排序</label>
                        <div class="col-sm-1">
                            <input ui-jq="TouchSpin" ng-model="advertise.sort" type="text" value="0" class="form-control text-center" data-min="0" data-max="100" data-step="1" data-decimals="0" style="display: block;">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">广告图片{{limit}}</label>
                        <div class="col-md-10 no-padder">
                            <div>
                                <uploadpic queue-limit="{{limit}}" path="{{path}}"  images="saveImgQueue" app="app" queue="imgQueue" info="advertise" del-func="delImages" required></uploadpic>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-4 col-sm-offset-2">
                            <button type="submit" class="btn btn-success">保存</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>